package com.ebocy.hammer.world.message;

import com.ebocy.hammer.core.constants.GameMessageCode;
import com.ebocy.hammer.core.message.AbstractS2CMessage;

public class S2CRoomFullMessage extends AbstractS2CMessage {
	private String battleServerIP;
	private short battleServerProt;
	private int roomId;
	private String mapName;

	public S2CRoomFullMessage(String battleServerIP,short battleServerProt,int roomId, String mapName) {
		this.battleServerIP = battleServerIP;
		this.battleServerProt = battleServerProt;
		this.roomId = roomId;
		this.mapName = mapName;
	}

	@Override
	protected void writeMessage() {
		writeString(battleServerIP);
		writeShort(battleServerProt);
		writeInt(roomId);
		writeString(mapName);
	}

	@Override
	public short getMessageCode() {
		return GameMessageCode.WORLD_4V4_ROOM_FULL;
	}

}
